<template>
    <el-form>
        <el-form-item>
            <el-input
                v-model.trim="textarea"
                style="width: 240px"
                :rows="10"
                type="textarea"
            />
        </el-form-item>
        <el-form-item>
            <el-button class="btn" type="primary" @click="onSave"
                >保存</el-button
            >
        </el-form-item>
    </el-form>
</template>
<script setup lang="ts" name="CntrTextArea">
import { ref } from 'vue';
const textarea = ref('');
const emit = defineEmits<{
    save: [cntrs: string];
}>();
const onSave = () => {    
    emit('save', textarea.value);
};
</script>
<style lang="scss" scoped></style>
